/**
 * jims
 */
package com.jims.master.modules.csm.dao;

import com.jims.master.common.persistence.CrudDao;
import com.jims.master.common.persistence.annotation.MyBatisDao;
import com.jims.master.modules.csm.entity.ExpStorageDept;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 消耗品库存单位字典表DAO接口
 * @author DT
 * @version 2017-03-09
 */
@MyBatisDao
public interface ExpStorageDeptDao extends CrudDao<ExpStorageDept> {

    /**
     * 自动补全查询
     * @param expStorageDept
     * @param q
     * @return
     * @author ZHUQ
     */
    public List<ExpStorageDept> findAutoCompleteList(@Param("expStorageDept") ExpStorageDept expStorageDept, @Param("q") String q, @Param("limit") String limit);

    /**
     * 自动补全查询
     * @param expStorageDept
     * @param q
     * @return
     * @author ZHUQ
     */
    public List<ExpStorageDept> findAutoCompleteBySupplier(ExpStorageDept expStorageDept, @Param("q") String q, @Param("limit") String limit);

    /**
     * 根据库房名称查询库房信息(库房翻译)
     * @param storageName
     * @return
     * @author fengyg
     */
    public List<ExpStorageDept> getByName(@Param("storageName") String storageName, @Param("orgId") String orgId);

    /**
     * 根据科室ID查询库房信息
     * @param storageCode 库房表exp_storage_dept的storageCode,是科室表org_dept的ID
     * @return
     * @author fengyg
     */
    public ExpStorageDept getByStorageCode(@Param("storageCode") String storageCode);

    /**
     * 根据库房等级查询库房集合信息
     * @param expStorageDept
     * @return
     * @author fengyg
     */
    public List<ExpStorageDept> getByStorageLevel(ExpStorageDept expStorageDept);
}